package com.shop.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 商品分类 实体类。
 *
 * @author 彭新才
 * @since 2024-10-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "商品分类")
@Table(value = "shop_product_category")
public class ShopProductCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 产品分类id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "产品分类id")
    private Long id;

    /**
     * 分类名称
     */
    @Schema(description = "分类名称")
    private String name;

    /**
     * 上级分类id
     */
    @Schema(description = "上级分类id")
    private Long parentId;

    /**
     * 分类图片id
     */
    @Schema(description = "分类图片id")
    private Long imageId;

    /**
     * 排序方式(数字越小越靠前)
     */
    @Schema(description = "排序方式(数字越小越靠前)")
    private Long sort;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Timestamp createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Timestamp updateTime;

}
